import { IModuleConf } from "@wangeditor-next/editor";
import DisabledWatch from "./DisabledWatch";
import DisabledRender from "./DisabledRender";
import DisabledToHtml from "./DisabledToHtml";
import DisabledHtml from "./DisabledHtml";

/**
 * 自定义元素：不可编辑行内块
 */
export interface DisabledElement {
  type: string;
  value: string;
  children: { text: string }[];
}

const module: Partial<IModuleConf> = {
  editorPlugin: DisabledWatch,
  renderElems: [DisabledRender],
  elemsToHtml: [DisabledToHtml],
  parseElemsHtml: [DisabledHtml],
};

export default module;
